#! /usr/bin/env python
#coding=utf-8 
import redis
if __name__ == "__main__":
   autoLogKey='_UCSS_AUTO_LOG:'
   r = redis.Redis(host='134.128.196.10', port=6379, db=0)
   print dir(r)
   print '\ndbsize: %s' % r.llen(autoLogKey)
   icount=0
   for line in open('e:\\temp\\ivrtrack.log'):
       icount+=1
       line=line.decode('GBK')
       #print isinstance(line,unicode)
       #if icount>100: break
       r.lpush(autoLogKey,line)
       if icount%100==0:
           print 'current size:%s' % r.llen(autoLogKey)
